<?php

function getScreens(){
	$sl="SELECT * FROM proyects ORDER BY update_at";
	$r=mysql_query($sl);
	return $r;
}

function createScreen($datos){
	$sl=construct_insert_fields($datos);
	
	$query="INSERT INTO screens $sl";
	
	$r=mysql_query($query);
	return $r;
}

function getScreen_by_id($id){
	$sl="SELECT * FROM screens WHERE id=$id";
	$r=mysql_query($sl);
	return $r;
}

function getScreen_by_wireframe_id($id){
	$sl="SELECT * FROM screens WHERE wireframe_id=$id ORDER BY id DESC LIMIT 1";
	$r=mysql_query($sl);
	return $r;
}
function getScreens_history_by_wireframe_id($id){
	$sl="SELECT * FROM screens WHERE wireframe_id=$id ORDER BY id";
	$r=mysql_query($sl);
	return $r;
}

?>